Tables [dbo].[ContactLog]
Properties
PropertyValue
Created10:31:17 AM Tuesday, March 02, 2010
Last Modified1:20:14 PM Thursday, February 23, 2012
Columns
NameData TypeMax Length (Bytes)Allow Nulls
Cluster Primary Key PK_ContactLog: ContactLogKeyContactLogKeyuniqueidentifier16
No
Foreign Keys FK_ContactLog_ContactMain: [dbo].[ContactMain].ContactKeyIndexes IX_ContactLog_ContactKey: ContactKeyContactKeyuniqueidentifier16
No
SourceCodeCodenvarchar(40)80
No
Descriptionnvarchar(200)400
No
OutputOndatetime8
No
CreatedOndatetime8
No
Foreign Keys FK_ContactLog_UserMain_CreatedBy: [dbo].[UserMain].CreatedByUserKeyIndexes IX_ContactLog_CreatedByUserKey: CreatedByUserKeyCreatedByUserKeyuniqueidentifier16
No
Foreign Keys FK_ContactLog_OrganizationMain: [dbo].[OrganizationMain].OrganizationKeyIndexes IX_ContactLog_OrganizationKey: OrganizationKeyOrganizationKeyuniqueidentifier16
No
MarkedForDeleteOndatetime8
Yes
Indexes Indexes
NameColumnsUnique
Cluster Primary Key PK_ContactLog: ContactLogKeyPK_ContactLogContactLogKey
Yes
IX_ContactLog_ContactKeyContactKey
IX_ContactLog_CreatedByUserKeyCreatedByUserKey
IX_ContactLog_OrganizationKeyOrganizationKey
Foreign Keys Foreign Keys
NameColumns
FK_ContactLog_ContactMainContactKey->[dbo].[ContactMain].[ContactKey]
FK_ContactLog_OrganizationMainOrganizationKey->[dbo].[OrganizationMain].[OrganizationKey]
FK_ContactLog_UserMain_CreatedByCreatedByUserKey->[dbo].[UserMain].[UserKey]
SQL Script
CREATE TABLE [dbo].[ContactLog]
(
[ContactLogKey] [uniqueidentifier] NOT NULL,
[ContactKey] [uniqueidentifier] NOT NULL,
[SourceCodeCode] [nvarchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[Description] [nvarchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[OutputOn] [datetime] NOT NULL,
[CreatedOn] [datetime] NOT NULL,
[CreatedByUserKey] [uniqueidentifier] NOT NULL,
[OrganizationKey] [uniqueidentifier] NOT NULL,
[MarkedForDeleteOn] [datetime] NULL
) ON [PRIMARY]

GO
ALTER TABLE [dbo].[ContactLog] ADD CONSTRAINT [PK_ContactLog] PRIMARY KEY CLUSTERED ([ContactLogKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ContactLog_ContactKey] ON [dbo].[ContactLog] ([ContactKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ContactLog_CreatedByUserKey] ON [dbo].[ContactLog] ([CreatedByUserKey]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ContactLog_OrganizationKey] ON [dbo].[ContactLog] ([OrganizationKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ContactLog] ADD CONSTRAINT [FK_ContactLog_ContactMain] FOREIGN KEY ([ContactKey]) REFERENCES [dbo].[ContactMain] ([ContactKey])
GO
ALTER TABLE [dbo].[ContactLog] ADD CONSTRAINT [FK_ContactLog_OrganizationMain] FOREIGN KEY ([OrganizationKey]) REFERENCES [dbo].[OrganizationMain] ([OrganizationKey])
GO
ALTER TABLE [dbo].[ContactLog] ADD CONSTRAINT [FK_ContactLog_UserMain_CreatedBy] FOREIGN KEY ([CreatedByUserKey]) REFERENCES [dbo].[UserMain] ([UserKey])
GO
Uses